<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


// 验证码生成
Route::get('/code','CodeController@index');



// 前台注册页面
// Route::controller('/home/register','home\RegisterController');

// 前台注册页面(程焱)
Route::controller('/home/registo','home\RegistoController');

// 前台社区
Route::controller('/home/community','home\CommunityController');


// 前台登录执行
Route::controller('/home/login','home\LoginController');

// 后台登录入口
Route::get('/admin','admin\AdminController@index');

// 后台登陆执行
Route::post('/admin','admin\AdminController@load') -> middleware('login');

Route::group(['middleware'=>'adminsession'],function(){

	// 用户管理模块
	Route::controller('/admin/user','admin\UserController');

	// 管理员管理模块
	Route::controller('/admin/administrators','admin\AdministratorsController');

	// 信息管理模块
	Route::controller('/admin/message','admin\MessageController');

	// 分类管理模块
	Route::controller('/admin/classified','admin\ClassifiedController');

	// 商品管理模块
	Route::controller('/admin/goods','admin\GoodsController');

	// 订单处理模块
	Route::controller('/admin/order','admin\OrderController');

	// 网站配置模块
	Route::controller('/admin/configuration','admin\ConfigurationController');

	// 网站轮播图模块
	Route::controller('/admin/carousel','admin\CarouselController');


	// 用户申请店铺的审核
	Route::controller('/admin/examine','admin\ExamineController');

	// 用户对商品的所有评价
	Route::controller('/admin/evaluate','admin\EvaluateController');
	
	// 友情连接申请
	Route::controller('/admin/link','admin\LinkController');
	
});

// ==================================== 前台 3-21 开始 =============================



// 卖家中心 店铺管理
Route::controller('/home/seller/store','home\seller\StoreController');

// 卖家中心 商品管理
Route::controller('/home/seller/goods','home\seller\GoodsController');

// 卖家中心 订单管理
Route::controller('/home/seller/order','home\seller\OrderController');


// 用户订单管理
Route::controller('/home/userorder','home\UserorderController');

// 购物车
Route::controller('/home/shopcart','home\ShopcartController');

// 友情连接
Route::controller('/home/link','home\LinkController');

// 申请店铺
Route::controller('/home/examine','home\ExamineController');

// 个人中心
Route::controller('/home/detail','home\DetailController');

// 找回密码
Route::controller('/home/resetpass','home\ResetpassController');

// 主要功能=〉支付&购物车
Route::controller('/main','home\MainController');


// 消息中心
Route::controller('/home/infor','home\InforController');

// 评价
Route::controller('/home/evaluate','home\EvaluateController');

// 前台首页
Route::controller('/','home\HomeController');






